package com.atwisdom.star.core.dsl.functionClass;

import com.atwisdom.star.exception.pojo.BusinessException;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @author fushb
 * @description 针对表【batch_number】的数据库操作Service
 * @createDate 2023-02-14 00:51:15
 */
public interface BatchNumberDslService {


    /**
     * 获取批次号当前值
     *
     * @param param 参数据
     * @return 返回值
     */
    String getCurrentVal(Map<String, String> param) throws BusinessException;


    /**
     * 获取批次号当前值
     *
     * @param code 参数据
     * @return 返回值
     */
    String getCurrentValByCode(String code) throws BusinessException;

    @Transactional
    String fetchAutoGen(String value);

    @Transactional
    String getNextVal(String name);

    /**
     * 获取下一个批号值
     *
     * @param param 参数
     * @return 返回值
     */
    String getNextVal(Map<String, String> param) throws BusinessException;


    /**
     * 获取下一个批号值
     *
     * @param code 参数
     * @return 返回值
     */
    String getNextValByCode(String code) throws BusinessException;
}
